# Maintainer:
pkgname=py3-nose2
pkgver=0.14.0
pkgrel=0
pkgdesc="Successor to nose, based on unittest"
url="https://docs.nose2.io/en/latest/"
arch="noarch"
license="LGPL-2.0-or-later"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://github.com/nose-devs/nose2/archive/refs/tags/$pkgver/nose2-$pkgver.tar.gz"
builddir="$srcdir/nose2-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m unittest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	rm -r "$pkgdir"/usr/lib/python*/site-packages/nose2/tests
}

sha512sums="
ed6b245bc57b63b011883f42dbda8b2797504afa02a102c43f4e7d3c6cbfcf7e8babca23f9341c7681b75dae12c2d269ea65a583c18d4d15b999df081fc0247b  nose2-0.14.0.tar.gz
"
